﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Twi.COMMON.WCF
{
    public class ArrayEqualityComparer<T> : IEqualityComparer<T[]>
    {

        #region IEqualityComparer<int[]> Members

        #endregion

        #region IEqualityComparer<T[]> Members

        public bool Equals(T[] x, T[] y)
        {
            if (x.Length != y.Length)
            {
                return false;
            }
            for (int i = 0; i < x.Length; i++)
            {
                if (!x[i].Equals(y[i]))
                {
                    return false;
                }
            }
            return true;
        }

        public int GetHashCode(T[] obj)
        {
            return 0;
        }

        #endregion
    }
}
